package mk.jug.academy.model;

import javax.persistence.Column;
import javax.persistence.Entity;

/**
 * An entity modeling an event/activity in the application.
 *
 * @author Ice.Penov
 */
@Entity
public class Event extends RootEntity {
	
	public static final String CODE_PREFIX = "EVT-";
		
	@Column
	private String message;
	
	@Column
	private String messageCode;

	
	/**
	 * The code identifier of the entity. 
	 */
	public String getCode() {
		return CODE_PREFIX + getId();
	}

	/**
	 * Returns the message.
	 */
	public String getMessage() {
		return message;
	}

	/**
	 * Setter for the message.
	 */
	public void setMessage(String message) {
		this.message = message;
	}

	/**
	 * Returns the messageCode.
	 */
	public String getMessageCode() {
		return messageCode;
	}

	/**
	 * Setter for the messageCode.
	 */
	public void setMessageCode(String messageCode) {
		this.messageCode = messageCode;
	}

}